home *** CD-ROM | disk | FTP | other *** search
- -- card: 2992 from stack: in
- -- bmap block id: 2326
- -- flags: 0000
- -- background id: 2763
- -- name:
-
-
- -- part 1 (button)
- -- low flags: 00
- -- high flags: 0003
- -- rect: left=222 top=25 right=76 bottom=285
- -- title width / last selected line: 0
- -- icon id / first selected line: 27056 / 27056
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Analysis
- ----- HyperTalk script -----
- on mouseup
- global userName,showScripts,showEvents,analysis,theScripts
- put empty into background field 1
- put empty into user
- if userName is not empty then put ", " &word 1 of userName into user
- ask "Analyze what stack" &user &"?" with the short name of this stack
- if it is not empty then
- put it into theStack
- answer "Do message tracking?" with "Yes" or "No"
- put (it="Yes") into showEvents
- answer "Do script extraction?" with "Yes" or "No"
- put (it="Yes") into showScripts
- if user is not empty then put " for " &userName into user
- put "Analysis of " &theStack &" stack" &user into analysis
- if showEvents or showScripts then put " with" after analysis
- if showEvents then put " message tracking" after analysis
- if showEvents and showScripts then put " and" after analysis
- if showScripts then put " script extraction" after analysis
- put return &return after analysis
- setLocks true
- analyze theStack,0
- setLocks false
- put analysis &theScripts &return &"End of analysis" into background field 1
- put empty into analysis
- put empty into theScripts
- hide message box
- end if
- end mouseup
-
- on setLocks flag
- if flag then set cursor to 4 else pop card
- if flag then set lockScreen to true else set lockScreen to false
- if flag then set lockMessages to true else set lockMessages to false
- if flag then set lockRecent to true else set lockRecent to false
- if flag then push this card else set cursor to 1
- end setLocks
-
- on analyze thing,lev
- global analysis, showScripts, showEvents, theScripts
- put the name of thing into itsName
- put "Now examining " &itsName
- put indent(lev) &itsName &return after analysis
- if lev<2 then go to thing
- put word 1 of itsName into object
- if object="stack" then put "bkgnd,card" into sub
- if object="bkgnd" or object="card" then put object &" field," &object &" button" into sub
- if object="card" and lev=1 then
- put indent(lev) &" of" after analysis
- put the name of this bkgnd &return after analysis
- end if
-
- if showScripts then
- put the script of thing into itsScript
- if itsScript is not empty then
- put return &"Script of " &itsName &return after theScripts
- put itsScript &return after theScripts
- end if
- end if
-
- if showEvents then
- put the script of thing into itsScript
- put the number of lines of itsScript into nlines
- if nlines>2 then
- put "Now examining the script of " &itsName
- put indent(lev) &"- handles these message(s):" &return after analysis
- repeat with i=1 to nlines
- put line i of itsScript into linei
- put word 1 of linei into word1
- if (word1="on") then put indent(lev) &" " &(word 2 of linei) &return after analysis
- if(word1="pass") then put indent(lev) &" (which it passes)" &return after analysis
- if(word1="send") then put indent(lev) &"(It sends message " &(word 2 of linei) &" to " &(word 4 of linei) &")" &return after analysis
- end repeat
- end if
- end if
-
- if lev<2 then
- do "put the number of " &(item 1 of sub) &"s into n1"
- do "put the number of " &(item 2 of sub) &"s into n2"
- if n1<>1 then put "s" into s1 else put "" into s1
- if n2<>1 then put "s" into s2 else put "" into s2
- if n1+n2>0 then
- put indent(lev) &" contains " &n1 &" " &(item 1 of sub) after analysis
- put s1 &" and " &n2 &" " &(item 2 of sub) &s2 &return after analysis
- repeat with i=1 to 2
- do "put the number of " &(item i of sub) &"s into n"
- repeat with j=1 to n
- put (item i of sub) &" "&j into m
- analyze m,lev+1
- end repeat
- end repeat
- end if
- end if
- end analyze
-
- function indent level
- repeat with i=1 to level+1
- put " " after s
- end repeat
- return(s)
- end indent
-
-
- -- part 3 (button)
- -- low flags: 00
- -- high flags: 0003
- -- rect: left=442 top=25 right=78 bottom=504
- -- title width / last selected line: 0
- -- icon id / first selected line: 20098 / 20098
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
- ----- HyperTalk script -----
- on mouseUp
- go home
- end mouseUp
-
-
-
- -- part 4 (button)
- -- low flags: 00
- -- high flags: 0003
- -- rect: left=369 top=25 right=77 bottom=434
- -- title width / last selected line: 0
- -- icon id / first selected line: 1007 / 1007
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
- ----- HyperTalk script -----
- on mouseUp
- domenu "Print Report..."
- end mouseUp
-
-
-
- -- part 5 (button)
- -- low flags: 00
- -- high flags: 0003
- -- rect: left=295 top=25 right=76 bottom=361
- -- title width / last selected line: 0
- -- icon id / first selected line: 110 / 110
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
- ----- HyperTalk script -----
- on mouseUp
- put the short name of this stack &".txt" into fileName
- ask "Export text to what file?" with fileName
- if it is empty then exit mouseup
- put it into fileName
- open file fileName
- go to first card
- write background field "Display" to file filename
- close file fileName
- end mouseUp
-
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: 0003
- -- rect: left=456 top=287 right=340 bottom=504
- -- title width / last selected line: 0
- -- icon id / first selected line: 2 / 2
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
- ----- HyperTalk script -----
- on mouseUp
- answer "YES erases the current analysis:" with "YES" or "Not now"
- if it is "YES" then put empty into background field "Display"
- end mouseUp
-
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=148 top=51 right=83 bottom=194
- -- title width / last selected line: 0
- -- icon id / first selected line: 2478 / 2478
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
- ----- HyperTalk script -----
- on mouseUp
- go next card
- end mouseUp
-
-